import random
from packages.engine.decision_handler import DecisionHandler


class LeaveDecisionHandler(DecisionHandler):
    def decide(self, execution):
        # 生成1~10的随机数
        random_number = random.randint(1, 10)
        # 1~10随机，整除2则返回approveBoss，否则返回end
        if random_number % 2 == 0:
            return "approveBoss"
        else:
            return "end"
